package bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import common.RowMapper;

public class OrderDetailRowMapper implements RowMapper<OrderDetail> {

	@Override
	public OrderDetail mapper(ResultSet rs) throws SQLException {
		OrderDetail od=new OrderDetail();
		od.setOrderDetailid(rs.getInt("order_detailid"));
		od.setOrderid(rs.getInt("orderid"));
		od.setGoodsid(rs.getInt("goodsid"));
		od.setNum(rs.getInt("num"));
		od.setPrice(rs.getDouble("price"));
		od.setCost(rs.getDouble("cost"));
		od.setSubtotal(rs.getDouble("subtotal"));
		od.setStatus(rs.getInt("status"));
		return od;
	}
}
